package com.hl.card.modular.packBack.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.annotation.AccessType;
import org.springframework.stereotype.Service;

import com.alibaba.fastjson.JSONObject;
import com.hl.card.common.annotion.DataSource;
import com.hl.card.common.constant.DSEnum;
import com.hl.card.common.persistence.dao.CardMapper;
import com.hl.card.modular.packBack.service.CardService;

@Service
public class CardServiceImpl implements CardService{
	
	@Autowired
	private CardMapper cardMapper;
	
	@DataSource(name=DSEnum.DATA_SOURCE_BIZ)
	@Override
	public List<JSONObject> selectCard(Map<String, String> map)
			throws Exception {
		return cardMapper.selectCard(map);
	}
	
	@DataSource(name=DSEnum.DATA_SOURCE_BIZ)
	@Override
	public int insertCard(Map<String, String> map) throws Exception {
		return cardMapper.insertCard(map);
	}
	
	@DataSource(name=DSEnum.DATA_SOURCE_BIZ)
	@Override
	public int deleteCard(Map<String, String> map) throws Exception {
		return cardMapper.deleteCard(map);
	}
	
	@DataSource(name=DSEnum.DATA_SOURCE_BIZ)
	@Override
	public List<JSONObject> selectCardData(Map<String, String> map)
			throws Exception {
		return cardMapper.selectCardData(map);
	}
	
	@DataSource(name=DSEnum.DATA_SOURCE_BIZ)
	@Override
	public List<JSONObject> selectFlowList(Map<String, String> map)
			throws Exception {
		return cardMapper.selectFlowList(map);
	}

	@Override
	public List<JSONObject> selectUser(List list) throws Exception {
		return cardMapper.selectUser(list);
	}
	
}
